package com.dura.common.exception;

import com.dura.common.enums.ExceptionEnums;
import lombok.Getter;

/**
 * @version 1.0
 * @Author 振鹏
 * @Date 2025/3/15 21:55
 * @注释
 */
@Getter
public class ApiException extends RuntimeException  {
    private Integer code;

    public ApiException(Integer code,String msg) {
        super(msg);
        this.code=code;
    }

    public ApiException(ExceptionEnums enums) {
        super(enums.getMsg());
        this.code = enums.getCode();
    }

}
